package cn.com.springsource.ioc.day1;

import org.springframework.context.support.ClassPathXmlApplicationContext;

public class ContextApplication {

    public static void main(String[] args) {
        ClassPathXmlApplicationContext context =
                new ClassPathXmlApplicationContext("spring-context.xml");

        IndexService indexService = (IndexService) context.getBean("indexService");
        IndexService indexServiceConstructor = (IndexService) context.getBean("indexServiceConstructor");
        System.out.println(indexService.hashCode()+","+indexServiceConstructor.hashCode());
        indexServiceConstructor.serviceTest();
        indexService.serviceTest();
    }
}
